]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
NetworkMenu: defer calling syncSectionTitle until after pushing the device
authorGiovanni Campagna <gcampagna@src.gnome.org>
Mon, 28 Jan 2013 23:23:31 +0000 (00:23 +0100)
committerGiovanni Campagna <gcampagna@src.gnome.org>
Tue, 29 Jan 2013 14:28:02 +0000 (15:28 +0100)
syncSectionTitle looks at device list for the section, to understand if
the section should be visible or not, so obviously it needs to see the
new device.

I wonder when this broke.

https://bugzilla.gnome.org/show_bug.cgi?id=692749

js/ui/status/network.js

index ce1e7e44b82e5e2ae3b4806452463b2bce473a2f..8c7c4dc7553f5c8396d56ae8ae275e928ed2b886 100644 (file)
@@ -1934,10 +1934,10 @@ const NMApplet = new Lang.Class({
         section.addMenuItem(wrapper.statusItem);
         section.addMenuItem(wrapper.section);
 
-        this._syncSectionTitle(wrapper.category);
-
         let devices = this._devices[wrapper.category].devices;
         devices.push(wrapper);
+
+        this._syncSectionTitle(wrapper.category);
     },
 
     _deviceRemoved: function(client, device) {